lib: make structuredClone spec compliant#40251
lib: make structuredClone spec compliant#40251VoltrexKeyva wants to merge 1 commit intonodejs:masterfrom
Conversation
|
It would be nice to have a WPT for this. |
|
BTW, I'm not sure we should throw an error, but instead just grab |
We mostly just throw an error if the passed value is not spec complaint in most cases, throwing an error here would be nice for keeping consistency unless there's a special case where we have to avoid throwing an error. |
|
What's important here is not consistency, but spec compliance. The spec just asks to pass const options = [];
options.transfer = [toTransfer];
structuredClone({}, options); |
8537f2e to
ab4fd2b
Compare
ab4fd2b to
0fd3037
Compare
|
Do we have a WHATWG spec specialist that we could ping to take a look? |
|
Maybe @surma would be available to review this, since they are the one who proposed this API to WHATWG. |
|
Landed in 6199441...3d11baf |
Fixes: #40246